<template>
	<div>
		<layout-main 
		:dataList="dataList"
		:allList = "allList"
		@clickItem="clickItem"
		@pagination="pagination"
		ref="layoutMain"
		></layout-main>
	</div>
</template>

<script>
	import request from "../../../network/request.js"
	import layoutMain from '../../../components/layoutMain.vue'
	export default {
		data(){
			return{
				allList: 100,
				dataList: {
					cont:100,
					code:1,
					type:'wz',  //或者sp
					data:[
						{
							date:'2017-08-98',
							title:'推荐',
							info:'',  //如果是文章就是文字   视频就是地址
							imgUrl:'https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png'
						},
						{
							date:'2017-08-98',
							title:'推荐',
							info:'',  //如果是文章就有 反之没有
							imgUrl:'https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png'
						},
						{
							date:'2017-08-98',
							title:'推荐',
							info:'',  //如果是文章就有 反之没有
							imgUrl:'https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png'
						},
						{
							date:'2017-08-98',
							title:'推荐',
							info:'',  //如果是文章就有 反之没有
							imgUrl:'https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png'
						},
						{
							date:'2017-08-98',
							title:'推荐',
							info:'',  //如果是文章就有 反之没有
							imgUrl:'https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png'
						},
						{
							date:'2017-08-98',
							title:'励志',
							info:'',  //如果是文章就有 反之没有
							imgUrl:'https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png'
						},
						{
							date:'2017-08-98',
							title:'牛逼安保',
							info:'',  //如果是文章就有 反之没有
							imgUrl:'https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png'
						},
						{
							date:'2017-08-98',
							title:'牛逼安保',
							info:'',  //如果是文章就有 反之没有
							imgUrl:'https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png'
						},
						{
							date:'2017-08-98',
							title:'牛逼安保',
							info:'',  //如果是文章就有 反之没有
							imgUrl:'https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png'
						},
						{
							date:'2017-08-98',
							title:'牛逼安保',
							info:'',  //如果是文章就有 反之没有
							imgUrl:'https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png'
						},
						{
							date:'2017-08-98',
							title:'牛逼安保',
							info:'',  //如果是文章就有 反之没有
							imgUrl:'https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png'
						},
						{
							date:'2017-08-98',
							title:'牛逼安保',
							info:'',  //如果是文章就有 反之没有
							imgUrl:'https://shadow.elemecdn.com/app/element/hamburger.9cf7b091-55e9-11e9-a976-7f4d0b07eef6.png'
						}
					]
				}
			}
		},
		methods:{
			clickItem(item,index){
				console.log(item,index);
			},
			//分页
			pagination(val){
				console.log(val);
				request({
					method: 'post',
					Url: '*',
					params: {
						curPage: val,
						pageSize: 12
					}
				}).then(res => {
					// this.allList = 200;
				}).catch(err => {
				
				})
			}
		},
		components:{
			layoutMain
		}
	}
</script>

<style>
	
</style>